package com.pengshun.modules.api.statistical.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author luoligang
 * @create 2021/1/20
 */
@Data
@NoArgsConstructor
public class CoalStatisticalDto {


    private Long coalStatisticalId;

    private Long  coalId;

    /**
     * 煤炭名称
     */
    private String coalName;
    /**
     * 煤矿名称
     */
    private String mineMouthName;
    /**
     * 上期价格
     */
    private BigDecimal stageiaPrice;
    /**
     * 当前价格
     */
    private BigDecimal nowPrice;
    /**
     * 去年价格
     */
    private BigDecimal lastYearPrice;
    /**
     * 环比
     */
    private String ringThan;
    /**
     * 环比%
     */
    private String ringThanPercent;
    /**
     * 同比
     */
    private String sameThan;
    /**
     * 同比%
     */
    private String sameThanPercent;
    /**
     * 涨跌加价
     */
    private String riseAndFall;
    /**
     * 涨跌加价%
     */
    private String riseAndFallPercent;
    /**
     * 日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date priceDate;

    private Long userId;

    private Integer isold;
    /**
     * 颜色1红2绿3灰
     */
    private Integer color;
    /**
     * 更新时间
     */
    private Date createTime;

    @JsonFormat(timezone = "GMT+8", pattern = "MM-dd")
    private  Date xdesc;

    public Date getXdesc() {
        return this.priceDate;
    }

    public CoalStatisticalDto(Long coalId, String coalName, String mineMouthName, BigDecimal stageiaPrice, BigDecimal nowPrice, BigDecimal lastYearPrice, String ringThan, String ringThanPercent, String sameThan, String sameThanPercent, String riseAndFall, String riseAndFallPercent, Date priceDate, Long userId, Integer isold, Date createTime) {
        this.coalId = coalId;
        this.coalName = coalName;
        this.mineMouthName = mineMouthName;
        this.stageiaPrice = stageiaPrice;
        this.nowPrice = nowPrice;
        this.lastYearPrice = lastYearPrice;
        this.ringThan = ringThan;
        this.ringThanPercent = ringThanPercent;
        this.sameThan = sameThan;
        this.sameThanPercent = sameThanPercent;
        this.riseAndFall = riseAndFall;
        this.riseAndFallPercent = riseAndFallPercent;
        this.priceDate = priceDate;
        this.userId = userId;
        this.isold = isold;
        this.createTime = createTime;
    }
}
